package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatRepair;
import com.indusfo.spc.pojo.MatRepairFlow;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/25 10:35
 * @Version 1.0
 */
public interface MatRepairFlowMapper {

    /**
     * 新增
     */
    int insertMatRepairFlow(MatRepairFlow matRepairFlow);

    /**
     * 修改
     */
    int updateMatRepairFlow(MatRepairFlow matRepairFlow);

    /**
     * 查询
     */
    List<MatRepairFlow> queryMatRepairFlow(MatRepairFlow matRepairFlow);

    /**
     * 总数
     */
    int countMatRepairFlow(MatRepairFlow matRepairFlow);

    /**
     * 判重
     */
    int checkMatRepairFlow(MatRepairFlow matRepairFlow);

    /**
     * 启停
     */
    int deleteMatRepairFlow(@Param("matRepairFlowIds") List<Integer> matRepairFlowIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<MatRepairFlow> queryMatRepairFlowByMatRepairId(@Param("matRepairId") Integer matRepairId);

    /**
     * 级联删除修改
     */
    int deleteMatRepairFlowByMatRepairFlowId(@Param("matRepairFlowId") Integer matRepairFlowId, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<MatRepairFlow> queryMatRepairFlowByMatFlowId(@Param("matFlowId")Integer matFlowId);


    List<MatRepairFlow> queryMatRepairFlowByMatRepairList(@Param("matRepairList") List<MatRepair> matRepairList);
}